package org.yray.tcp;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class TcpClient {
    public static void main(String[] args) throws IOException {
        System.out.println("tcp协议客户端启动");

        // 创建socket客户端
        Socket socket = new Socket("127.0.0.1", 8899);
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("我是客户端".getBytes());
        socket.close();
    }


}
